package cn.com.dcsgo.dto;

import cn.com.dcsgo.enums.UserStatusEnum;
import cn.com.dcsgo.validation.NotBlankIfNotNull;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 修改后台用户请求参数
 *
 * @author Dcsgo
 * @since 2025/10/1 9:47
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "修改后台用户请求参数")
public class SysUserUpdateDTO {
    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为null")
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * 用户名
     */
    @NotBlankIfNotNull(message = "用户名不能为空白字符串")
    @Schema(description = "用户名")
    private String username;

    /**
     * 邮箱
     */
    @NotBlankIfNotNull(message = "邮箱不能为空白字符串")
    @Schema(description = "邮箱")
    private String email;

    /**
     * 手机号
     */
    @NotBlankIfNotNull(message = "手机号不能为空白字符串")
    @Schema(description = "手机号")
    private String mobile;

    /**
     * 密码
     */
    @NotBlankIfNotNull(message = "密码不能为空白字符串")
    @Schema(description = "密码")
    private String password;

    /**
     * 用户状态  0：禁用   1：正常
     */
    @Schema(description = "用户状态", allowableValues = {"0", "1"}, type = "integer", format = "int32")
    private UserStatusEnum status;

    /**
     * 角色ID列表
     */
    @Schema(description = "角色ID列表", example = "[1,2]")
    private List<Long> roleIdList;
}
